#!/usr/bin/env php
<?php
error_reporting(E_ALL & ~E_NOTICE);

define('APP_PATH', __DIR__);
define('DISPLAY_ERRORS', TRUE);
define('DEBUG', TRUE);
define('DB_EMPTY', 3001);
define('DB_ERROR', 3002);
define('PARAM_NOT_EXISTS', 4001);
define('PARAM_EMPTY', 4004);

use BeReborn\Web\Application;
use Swoole\Coroutine;


require_once __DIR__ . '/vendor/autoload.php';
$config = require_once __DIR__ . '/config/config.php';

(function ($config, $argv) {
	$application = new Application($config);
	$snooze = $application->getSwooleServer($argv);
	$snooze->start();
})($config, $argv);
